package com.flyco.dialog.widget.base;

import android.content.Context;
import android.view.View;
import android.view.Window;
import android.view.animation.TranslateAnimation;
import android.widget.FrameLayout.LayoutParams;
import android.widget.LinearLayout;
import com.flyco.animation.BaseAnimatorSet;
import com.nineoldandroids.animation.Animator;
import com.nineoldandroids.animation.AnimatorSet;
import com.nineoldandroids.animation.ObjectAnimator;

public abstract class TopBaseDialog extends BottomTopBaseDialog
{
  private BaseAnimatorSet windowInAs;
  private BaseAnimatorSet windowOutAs;

  public TopBaseDialog(Context paramContext)
  {
    this(paramContext, null);
  }

  public TopBaseDialog(Context paramContext, View paramView)
  {
    super(paramContext);
    this.animateView = paramView;
    this.innerShowAnim = new TranslateAnimation(1, 0.0F, 1, 0.0F, 1, -1.0F, 1, 0.0F);
    this.innerDismissAnim = new TranslateAnimation(1, 0.0F, 1, 0.0F, 1, 0.0F, 1, -1.0F);
  }

  public void dismiss()
  {
    dismissWithAnim();
  }

  protected BaseAnimatorSet getWindowInAs()
  {
    if (this.windowInAs == null)
      this.windowInAs = new WindowInAs(null);
    return this.windowInAs;
  }

  protected BaseAnimatorSet getWindowOutAs()
  {
    if (this.windowOutAs == null)
      this.windowOutAs = new WindowOutAs(null);
    return this.windowOutAs;
  }

  public void onAttachedToWindow()
  {
    super.onAttachedToWindow();
    showWithAnim();
  }

  protected void onStart()
  {
    super.onStart();
    this.ll_top.setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
    this.ll_top.setGravity(48);
    getWindow().setGravity(48);
    this.ll_top.setPadding(this.left, this.top, this.right, this.bottom);
  }

  private class WindowInAs extends BaseAnimatorSet
  {
    private WindowInAs()
    {
    }

    public void setAnimation(View paramView)
    {
      ObjectAnimator localObjectAnimator1 = ObjectAnimator.ofFloat(paramView, "scaleX", new float[] { 1.0F, 0.9F });
      ObjectAnimator localObjectAnimator2 = ObjectAnimator.ofFloat(paramView, "scaleY", new float[] { 1.0F, 0.9F });
      this.animatorSet.playTogether(new Animator[] { localObjectAnimator1, localObjectAnimator2 });
    }
  }

  private class WindowOutAs extends BaseAnimatorSet
  {
    private WindowOutAs()
    {
    }

    public void setAnimation(View paramView)
    {
      ObjectAnimator localObjectAnimator1 = ObjectAnimator.ofFloat(paramView, "scaleX", new float[] { 0.9F, 1.0F });
      ObjectAnimator localObjectAnimator2 = ObjectAnimator.ofFloat(paramView, "scaleY", new float[] { 0.9F, 1.0F });
      this.animatorSet.playTogether(new Animator[] { localObjectAnimator1, localObjectAnimator2 });
    }
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.flyco.dialog.widget.base.TopBaseDialog
 * JD-Core Version:    0.6.2
 */